(ns mini.flow)

(str "2 is " (if (even? 2) "even" "odd"))
(if (true? false) "impossible!")
(if true :truthy :falsey)
(if (Object.) :truthy :falsey)
(if [] :truthy :falsey)
(if 0 :truthy :falsey)
(if false :truthy :falsey)
(if nil :truthy :falsey)

(if (even? 5)
  (do (println "even") true)
  (do (println "odd") false))

(let [x -1]
  (when (neg? x)
    (throw (RuntimeException. (str "x must be positive:" x)))))

(let [x 10]
  (cond
    (< x 2) "x is less then 2"
    (< x 10) "x is less then 10"
    (< x  6) "x is less then 6"
    :else "x is greater then or equal to 10"))